<link rel="stylesheet" href="basics.css">

<button type="button" id="one" class="item one">1</button>
<button type="button" id="two" class="item two">2</button>
<button type="button" id="three" class="item three">3</button>
<button type="button" id="four" class="item four">4</button>
<button type="button" id="five" class="item five">5</button>

<script src="../../dist/DragSelect.js"></script>
<script>
    window.selected = [];

    const ds = new DragSelect({
        selectables: document.querySelectorAll('.item'),
    });
    ds.subscribe('DS:end', ({items}) => window.selected = items.map(item => item.id))
</script>
